<template>
	 <uni-card spacing="0px 20px" padding="0px" class="content-card">
		 <view class="card-top-view">
			 <view class="top-label">{{task.taskCode || ""}}</view>
			 <view class="top-time">{{task.createTime}}</view>
		 </view>
		 <view class="card-body-view">
			
			<view class="body-item">
							 <view class="body-item-label">产品:</view>
							  <view class="body-item-value">{{task.processCode + " " + task.itemName}}</view>
			</view>
			<view class="body-item">
							 <view class="body-item-label">合格品数量:</view>
							  <view class="body-item-value">{{task.quantityQuanlify}}</view>
			</view>
			<view class="body-item">
							 <view class="body-item-label">不良品数量:</view>
							  <view class="body-item-value">{{task.quantityUnquanlify}}</view>
			</view>
			<view class="body-item">
							 <view class="body-item-label">排产数量:</view>
							  <view class="body-item-value">{{task.quantity}}</view>
			</view>
		 </view>
		 <view class="card-bottom">
		 	<text class="txt" @click="change">切换</text>
		 </view>
	 </uni-card>
</template>

<script>
	export default {
		props:{
			task:{
				type:Object,
				required:true
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			change(){
				this.$emit("changeTask",this.task)
			}
		}
	}
</script>

<style lang="scss">
.card-top-view{
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #9a9a9a;
	height: 90rpx;
	.top-label{
		color: #9a9a9a;
		font-size: 28rpx;
	}
	.top-time{
		padding: 0 20rpx;
		border: 1px solid #3c9cff;
		color: #3c9cff;
		font-size: 28rpx;
	}
}
.card-body-view{
	padding: 15rpx 0;
		border-bottom: 1px solid #9a9a9a;
		.body-item{
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			padding: 10rpx 0;
			.body-item-label{
				color: #333333;
				font-size: 28rpx;
			}
			.body-item-value{
				color: #9a9a9a;
				font-size: 28rpx;
			}
		}
	}
	.card-bottom{
		line-height: 90rpx;
		text-align: center;
		.txt{
			color: #f9ae3d;
			font-size: 30rpx;
		}
		
	
	}

</style>
